package insight.schedule;

public class Main {

    public static void main(String[] args) throws InterruptedException {
        ScheduleService scheduleService = new ScheduleService();
        scheduleService.schedule(()->{
            System.out.println(1);
        }, 100);

        Thread.sleep(1000);
        System.out.println("添加一个每200毫秒打印一个2的定时任务");
        scheduleService.schedule(()->{
            System.out.println(1);
        }, 200);
    }
}
